import json
import requests

user_info = {'name': 'letian', 'nickname': 'let'}
user_info = json.dumps(user_info)
headers = {'Content-Type': 'application/json'}
r = requests.post("http://127.0.0.1:5000/register", data=user_info, headers=headers)

print(r.text)